#pragma once
#include "C_Widget.h"
#include "C_Sprite.h"

namespace gui
{
	class C_Picture :
		public C_Widget
	{
	private:
		C_Sprite m_texture;
	public:
		C_Picture();
		virtual ~C_Picture();

		void loadFromFile(std::string filename) { m_texture.loadFromFile(filename); setSize(m_texture.width(), m_texture.height()); }
		void setPictureSize(float w, float h) { m_texture.setSize(w, h); setSize(w, h); }
		float pictureWidth() { return m_texture.width(); }
		float pictureHeight() { return m_texture.height(); }

		virtual void renderWidget(); //for render contents
		virtual void syncWidgets(); //for synchronization with widgets position
	};
}

